package main

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"os"
)

func Hello(ctx *gin.Context) {
	name := "JacksonPeng"
	ctx.HTML(200, "index/index.html", name)
}

func main() {
	dir, _ := os.Getwd()
	fmt.Println("Current  working directory:", dir)
	router := gin.Default()

	router.LoadHTMLGlob("template/**/*")

	router.Static("/static", "static") // 推荐这个方式！！！
	//Arouter.StaticFS("/static", http.Dir("static"))

	router.GET("/", Hello)

	router.Run(":8080")
}
